 <!DOCTYPE html>
 <html>

 <head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    

    <title>{$Think.config.site.title} - 取消采购</title>

    <meta name="keywords" content="{$Think.config.site.keywords}">

    <link href="{$Think.config.site.resource_url}css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/animate.min.css" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/style.min.css?v=4.0.0" rel="stylesheet">

</head>
<style>
#listtable .fa{
	cursor:pointer;
	color:#1ab394;
	margin-right:1em;
}
th .tag{font-size: 12px; color: #e66c6c; font-weight: normal;}
.ibox-title .tag{font-size: 12px; color: #e66c6c; font-weight: normal; display: inline-block; margin-left: 20px;}
.specval-hide{display: none;}
</style>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
      <div class="row">
            <!-- <div class="col-sm-4">
                <div id="nestable-menu">
                	<button type="button" data-action="allot" class="btn btn-primary btn-sm"><i class="fa fa-share-alt"></i> 分配</button>
                </div>
            </div> -->
        </div>
        <div class="row">
          <div class="col-sm-12">
            <div class="ibox float-e-margins">

                <div class="ibox-content">
                    <form class="form-horizontal myform" id="">
                        <div class="input-group m-b">
                            <input type="hidden" name="pg_id" value="{$pg_id}" />
                            <div class="input-group-btn">
                                <button class="btn btn-white" type="button">原因：</button>
                            </div>
                            <input type="text" name="remarks" class="form-control" value="" required >
                        </div>
                        <div class="form-group">
                            <div class="col-sm-5 col-sm-offset-3">
                                <input type="submit" class="btn btn-primary" value="提交">
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>

    </div>
</div>

<script src="{$Think.config.site.resource_url}js/jquery.min.js?v=2.1.4"></script>
<script src="{$Think.config.site.resource_url}js/bootstrap.min.js?v=3.3.5"></script>
<script src="{$Think.config.site.resource_url}js/plugins/peity/jquery.peity.min.js"></script>
<script src="{$Think.config.site.resource_url}js/plugins/validate/jquery.validate.min.js"></script>
<script src="{$Think.config.site.resource_url}js/plugins/validate/messages_zh.min.js"></script>
<script src="{$Think.config.site.resource_url}js/plugins/iCheck/icheck.min.js"></script>
<script src="{$Think.config.site.resource_url}js/plugins/layer/layer.js"></script>
<script src="{$Think.config.site.common_resource_url}js/majax.js"></script>
<script src="{$Think.config.site.common_resource_url}js/jedit.js"></script>
</body>

</html>
<script>

    var layer_font='';
    $(document).ready(function() {
        $(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",});
        $("form").validate({
            debug:true,
            submitHandler:function(form){
                cancel();   
            },    
            rules: {
                remarks: {
                    required: true,
                },
            },
            messages: {
                remarks: {
                    required: '原因必须填写',
                },
            }
        });

        function cancel(){
            var fomrData = $("form").serialize();
            majax('{:url("cancel")}',fomrData,function(d){
                if (d.code>0) {
                    window.parent.editSuccess(d);
                }else{
                    layer.msg(d.msg, {icon: 5});
                }
            })
        };
    });	

</script>